
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>defect &#8212; atomman 1.4.0 documentation</title>
    <link rel="stylesheet" href="_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="FreeSurface" href="atomman.defect.FreeSurface.html" />
    <link rel="prev" title="RelaxedCrystal" href="atomman.library.RelaxedCrystal.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.defect.FreeSurface.html" title="FreeSurface"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="atomman.library.RelaxedCrystal.html" title="RelaxedCrystal"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" accesskey="U">atomman package</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="defect">
<h1>defect<a class="headerlink" href="#defect" title="Permalink to this headline">¶</a></h1>
<div class="section" id="classes">
<h2>Classes<a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.FreeSurface.html">FreeSurface</a></li>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.StackingFault.html">StackingFault</a></li>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.GammaSurface.html">GammaSurface</a></li>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.VolterraDislocation.html">VolterraDislocation</a></li>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.IsotropicVolterraDislocation.html">IsotropicVolterraDislocation</a></li>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.Stroh.html">Stroh</a></li>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.Dislocation.html">Dislocation</a></li>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.DifferentialDisplacement.html">DifferentialDisplacement</a></li>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.SDVPN.html">SDVPN</a></li>
<li class="toctree-l1"><a class="reference internal" href="atomman.defect.Strain.html">Strain</a></li>
</ul>
</div>
</div>
<div class="section" id="module-atomman.defect">
<span id="functions-and-attributes"></span><h2>Functions and attributes<a class="headerlink" href="#module-atomman.defect" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="atomman.defect.differential_displacement">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">differential_displacement</code><span class="sig-paren">(</span><em class="sig-param">system_0</em>, <em class="sig-param">system_1</em>, <em class="sig-param">burgers</em>, <em class="sig-param">plotxaxis='x'</em>, <em class="sig-param">plotyaxis='y'</em>, <em class="sig-param">xlim=None</em>, <em class="sig-param">ylim=None</em>, <em class="sig-param">zlim=None</em>, <em class="sig-param">neighbors=None</em>, <em class="sig-param">cutoff=None</em>, <em class="sig-param">component='standard'</em>, <em class="sig-param">axes=None</em>, <em class="sig-param">plot_scale=1</em>, <em class="sig-param">atom_color=None</em>, <em class="sig-param">atom_cmap=None</em>, <em class="sig-param">display_final_pos=False</em>, <em class="sig-param">return_data=False</em>, <em class="sig-param">matplotlib_axes=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.differential_displacement" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a differential displacement plot for characterizing dislocations.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system_0</strong> (<em>atomman.system</em>) – The base/reference system to use.</p></li>
<li><p><strong>system_1</strong> (<em>atomman.system</em>) – The defect/current system to use.</p></li>
<li><p><strong>burgers</strong> (<em>array-like object</em>) – The dislocation’s Burgers vector.</p></li>
<li><p><strong>plotxaxis</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><em>array-like object</em><em>, </em><em>optional</em>) – Indicates the Cartesian direction associated with the system’s atomic
coordinates to align with the plotting x-axis.  Values are either 3D
unit vectors, or strings ‘x’, ‘y’, or ‘z’ for the Cartesian axes
directions.  plotxaxis and plotyaxis must be orthogonal.  Default value
is ‘x’ = [1, 0, 0].</p></li>
<li><p><strong>plotyaxis</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><em>array-like object</em><em>, </em><em>optional</em>) – Indicates the Cartesian direction associated with the system’s atomic
coordinates to align with the plotting y-axis.  Values are either 3D
unit vectors, or strings ‘x’, ‘y’, or ‘z’ for the Cartesian axes
directions.  plotxaxis and plotyaxis must be orthogonal.  Default value
is ‘y’ = [0, 1, 0].</p></li>
<li><p><strong>xlim</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><em>tuple</em></a><em>, </em><em>optional</em>) – The minimum and maximum coordinates along the plotting x-axis to
include in the fit.  Values are taken in the specified length_unit.
If not given, then the limits are set based on min and max atomic
coordinates along the plotting axis.</p></li>
<li><p><strong>ylim</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><em>tuple</em></a><em>, </em><em>optional</em>) – The minimum and maximum coordinates along the plotting y-axis to
include in the fit.  Values are taken in the specified length_unit.
If not given, then the limits are set based on min and max atomic
coordinates along the plotting axis.</p></li>
<li><p><strong>zlim</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.9)"><em>tuple</em></a><em>, </em><em>optional</em>) – The minimum and maximum coordinates normal to the plotting axes
(i.e. plotxaxis X plotyaxis) to include in the fit.  Values are taken
in the specified length_unit.  The optimum zlim should encompass only
a single periodic slice.  If not given, then the limits are set
based on min and max atomic coordinates along the axis.</p></li>
<li><p><strong>neighbors</strong> (<a class="reference internal" href="atomman.NeighborList.html#atomman.NeighborList" title="atomman.NeighborList"><em>atomman.NeighborList</em></a><em>, </em><em>optional</em>) – The neighbor list associated with system_0 to use.  Either neighbors
or cutoff must be given, or system_0 must have a neighbors attribute.</p></li>
<li><p><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Cutoff distance for computing a neighbor list for system_0.  Either
neighbors or cutoff must be given, or system_0 have a neighbors
attribute.</p></li>
<li><p><strong>component</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em>, </em><em>optional</em>) – Indicates the style of the calculation to use.  ‘standard’ (default)
plots the differential displacements between atoms in the Burgers
direction.  ‘xy’ plots the differential displacements within the xy
plotting plane.  This is useful for screw dislocations with localized
non-screw components.</p></li>
<li><p><strong>axes</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – 3x3 transformation array to apply to the Burgers vector to make it
correspond to the system’s orientation.</p></li>
<li><p><strong>plot_scale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Scalar for multiplying the magnitude of the differential displacement
arrows.  Default value is 1 (no scaling).</p></li>
<li><p><strong>atom_color</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><em>list</em></a><em>, </em><em>optional</em>) – Matplotlib color name(s) to use to display the atoms.  If str, that
color will be assigned to all atypes.  If list, must give a color value
or None for each atype.  Default value (None) will use cmap instead.
Note: atom_color and atom_cmap can be used together as long as exactly
one color or cmap is given for each unique atype.</p></li>
<li><p><strong>atom_cmap</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.9)"><em>list</em></a><em>, </em><em>optional</em>) – Matplotlib colormap name(s) to use to display the atoms.  Atoms will
be colored based on their initial positions and scaled using zlim. If
str, that cmap will be assigned to all atypes.  If list, must give a
cmap value or None for each atype.  Default value (None) will use ‘hsv’
cmap.  Note: atom_color and atom_cmap can be used together as long as
exactly one color or cmap is given for each unique atype.</p></li>
<li><p><strong>display_final_pos</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Flag to display positions of atoms and arrows relative to final
configuration (system_1) rather than initial configuration (system_0).
Note that this does not affect the atom’s cmap color as the initial
plotzaxis is always used.</p></li>
<li><p><strong>return_data</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – If True, will return a dict containing the differential displacement
vectors and vector positions.  Default is False.  Note: returned values
are oriented relative to the plotting axes.</p></li>
<li><p><strong>matplotlib_axes</strong> (<em>matplotlib.Axes.axes</em><em>, </em><em>optional</em>) – An existing matplotlib axes object. If given, the differential displacement
plot will be added to the specified axes of an existing figure.  This
allows for subplots to be constructed.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><strong>fig</strong> (<em>matplotlib.figure</em>) – The generated figure. Not returned if matplotlib_axes is given.</p></li>
<li><p><strong>data</strong> (<em>dict</em>) – Contains differential displacement vectors and arrow plotting information.
Returned if return_data is True.</p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.dislocation_array">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">dislocation_array</code><span class="sig-paren">(</span><em class="sig-param">system</em>, <em class="sig-param">dislsol=None</em>, <em class="sig-param">m=None</em>, <em class="sig-param">n=None</em>, <em class="sig-param">burgers=None</em>, <em class="sig-param">bwidth=None</em>, <em class="sig-param">cutoff=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.dislocation_array" title="Permalink to this definition">¶</a></dt>
<dd><p>Method that converts a bulk crystal system into a periodic array of
dislocations.  A single dislocation is inserted using a dislocation
solution.  The system’s box and pbc are altered such that the system is
periodic and compatible across the two box vectors contained in the slip
plane.  The third box vector is non-periodic, resulting in free surfaces
parallel to the dislocation’s slip plane.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system</strong> (<a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System"><em>atomman.System</em></a>) – A perfect, bulk atomic system.</p></li>
<li><p><strong>dislsol</strong> (<a class="reference internal" href="atomman.defect.Stroh.html#atomman.defect.Stroh" title="atomman.defect.Stroh"><em>atomman.defect.Stroh</em></a><em> or </em><em>atomman.defect.IsotropicVolterra</em><em>, </em><em>optional</em>) – A dislocation solution to use to displace atoms by.  If not given,
all atoms will be given linear displacements associated with the
long-range limits.</p></li>
<li><p><strong>m</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The dislocation solution m unit vector.  This vector is in the slip
plane and perpendicular to the dislocation line direction.  Only needed
if dislsol is not given.</p></li>
<li><p><strong>n</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The dislocation solution n unit vector.  This vector is normal to the
slip plane.  Only needed if dislsol is not given.</p></li>
<li><p><strong>burgers</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The Cartesian Burger’s vector for the dislocation relative to the
given system’s Cartesian coordinates.  Only needed if dislsol is not
given.</p></li>
<li><p><strong>bwidth</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The width of the boundary region at the free surfaces.  Atoms within
the boundaries will be displaced by linear displacements instead of
by the dislocation solution.  Only given if dislsol is not None.
Default value if dislsol is given is 10 Angstroms.</p></li>
<li><p><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Cutoff distance to use for identifying duplicate atoms to remove.
For dislocations with an edge component, applying the displacements
creates an extra half-plane of atoms that will have (nearly) identical
positions with other atoms after altering the boundary conditions.
Default cutoff value is 0.5 Angstrom.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The resulting periodic array of dislocations system.  An additional
atoms property ‘old_id’ will be added to map the atoms in the defect
system back to the associated atoms in the original system.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.dislocation_system_transform">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">dislocation_system_transform</code><span class="sig-paren">(</span><em class="sig-param">ξ_uvw</em>, <em class="sig-param">slip_hkl</em>, <em class="sig-param">m=None</em>, <em class="sig-param">n=None</em>, <em class="sig-param">box=None</em>, <em class="sig-param">tol=1e-08</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.dislocation_system_transform" title="Permalink to this definition">¶</a></dt>
<dd><p>Utility function for getting the transformation matrix to the dislocation system
based on crystal orientation vectors.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ξ_uvw</strong> (<em>array-like object</em>) – The Miller crystal vector associated with the dislocation’s line direction.</p></li>
<li><p><strong>slip_hkl</strong> (<em>array-like object</em>) – The Miller plane indices associated with the dislocation’s slip plane.</p></li>
<li><p><strong>m</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The m unit vector for the solution.  m, n, and u (dislocation line)
should be right-hand orthogonal.  Default value is [1, 0, 0]
(x-axis).</p></li>
<li><p><strong>n</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The n unit vector for the solution.  m, n, and u (dislocation line)
should be right-hand orthogonal.  Default value is [0, 1, 0]
(y-axis).</p></li>
<li><p><strong>box</strong> (<a class="reference internal" href="atomman.Box.html#atomman.Box" title="atomman.Box"><em>atomman.Box</em></a><em>, </em><em>optional</em>) – The unit cell’s box that the crystal vectors are taken with respect to. If
not given, will use a cubic box with a=1 (vects are taken as Cartesian).</p></li>
<li><p><strong>tol</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Tolerance parameter used to round off near-zero values.  Default
value is 1e-8.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.disregistry">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">disregistry</code><span class="sig-paren">(</span><em class="sig-param">basesystem, dislsystem, m=[1.0, 0.0, 0.0], n=[0.0, 1.0, 0.0], planepos=[0.0, 0.0, 0.0]</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.disregistry" title="Permalink to this definition">¶</a></dt>
<dd><p>Computes the disregistry profile for a dislocation system.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>basesystem</strong> (<a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System"><em>atomman.System</em></a>) – A perfect reference system with atoms directly corresponding to atoms
in dislsystem.</p></li>
<li><p><strong>dislsystem</strong> (<a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System"><em>atomman.System</em></a>) – A dislocation-containing system.</p></li>
<li><p><strong>m</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The dislocation solution m unit vector.  This vector is in the slip
plane and perpendicular to the dislocation line direction.  Default
value is [1,0,0] (Cartesian x-axis).</p></li>
<li><p><strong>n</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The dislocation solution n unit vector.  This vector is normal to the
slip plane.  Only needed if dislsol is not given.  Default
value is [0,1,0] (Cartesian y-axis).</p></li>
<li><p><strong>planepos</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – A position on the slip plane so that the plane can be fully defined.
The slip plane position should fall between two planes of atoms.
Default value is [0,0,0].</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><strong>coord</strong> (<em>numpy.ndarray</em>) – The (N,) array of unique coord-coordinates (atomic columns) neighboring
the slip plane.</p></li>
<li><p><strong>disregistry</strong> (<em>numpy.ndarray</em>) – A (N, 3) array of the dislocation’s disregistry at each coord.</p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.dumbbell">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">dumbbell</code><span class="sig-paren">(</span><em class="sig-param">system</em>, <em class="sig-param">pos=None</em>, <em class="sig-param">ptd_id=None</em>, <em class="sig-param">db_vect=None</em>, <em class="sig-param">scale=False</em>, <em class="sig-param">atol=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.dumbbell" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a new system by adding a dumbbell interstitial point defect.</p>
<p>1. Copies the indicated atom and moves both the original and copy to the
end of the Atoms list.
2. Displaces the dumbbell atoms position’s by +-db_vect.
3. Adds per-atom property old_id if it doesn’t exist corresponding to the
atom ids in the original system.
4. Sets any of the new atom’s per-atom properties to values given as
kwargs.  Any undefined properties are left unchanged.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system</strong> (<a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System"><em>atomman.System</em></a>) – The base System to add the defect to.</p></li>
<li><p><strong>pos</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – Position of the atom being modified.  Either pos or ptd_id must be
given.</p></li>
<li><p><strong>ptd_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a><em>, </em><em>optional</em>) – Id of the atom to be modified.  Either pos or ptd_id must be given.</p></li>
<li><p><strong>db_vect</strong> (<em>array-like object</em>) – Vector shift to apply to the atoms in the dumbbell.</p></li>
<li><p><strong>scale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if pos and db_vect are Cartesian (False) or box-relative
(True).  Default value is False.</p></li>
<li><p><strong>atol</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Absolute tolerance for position-based searching. Default value is 0.01
angstroms.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em><em>, </em><em>optional</em>) – Keyword arguments corresponding to per-atom property values for the
new atom in the dumbbell.  By default, all properties are left
unchanged (i.e. same as atom that was copied).</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A new system with the dumbbell added.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.free_surface_basis">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">free_surface_basis</code><span class="sig-paren">(</span><em class="sig-param">hkl</em>, <em class="sig-param">box=None</em>, <em class="sig-param">cutboxvector='c'</em>, <em class="sig-param">maxindex=None</em>, <em class="sig-param">return_hexagonal=None</em>, <em class="sig-param">return_planenormal=False</em>, <em class="sig-param">conventional_setting=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.free_surface_basis" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates the uvw box vector orientations for a free surface atomic
system.  In determining the uvw sets, two sets will be in the specified
hkl plane and one will be out of the plane.  Uses free surface in-plane
vector determination algorithm by W. Sun and G. Cedar, Surface Science,
617, 53-59 (2013) to identify two in-plane vectors and the plane normal.
The shortest in-plane vector is identified, as well as an out-of-plane
vector close to the plane normal.  The second in-plane vector is then
selected to be a shortest in-plane vector that is not parallel to the
first.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>hkl</strong> (<em>array-like object</em>) – The free surface plane to generate expressed in either 3 indices
Miller (hkl) format or 4 indices Miller-Bravais (hkil) format.</p></li>
<li><p><strong>box</strong> (<a class="reference internal" href="atomman.Box.html#atomman.Box" title="atomman.Box"><em>atomman.Box</em></a><em>, </em><em>optional</em>) – The box object associated with the unit cell. Used to identify the
best uvw set for the out-of-plane box vector.  Default value uses a
cubic box.</p></li>
<li><p><strong>cutboxvector</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em>, </em><em>optional</em>) – Specifies which of the three box vectors corresponds to the
out-of-plane vector.  Default value is c.</p></li>
<li><p><strong>maxindex</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a><em>, </em><em>optional</em>) – Max uvw index value to use in identifying the best uvw set for the
out-of-plane vector.  If not given, will use the largest absolute
index between the given hkl and the initial in-plane vector guesses.</p></li>
<li><p><strong>return_hexagonal</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Flag for indicating if the returned vectors are expressed in Miller
[uvw] format (False) or Miller-Bravais [uvtw] format (True).  The
Miller-Bravais format is only allowed if box is in the standard
hexagonal setting: a=b!=c, alpha=beta=90, gamma=120.  Default value is
False if hkl is given in the 3 indices Miller (hkl) format and True if
it is given in the 4 indices Miller-Bravais (hkil) format.</p></li>
<li><p><strong>return_planenormal</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – If True, the computed Cartesian plane normal will also be returned.
Default value is False.</p></li>
<li><p><strong>conventional_setting</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em>, </em><em>optional</em>) – Allows for rotations of a primitive unit cell box to be determined from
(hkl) indices specified relative to a conventional unit cell.  Allowed
settings: ‘p’ for primitive (no conversion), ‘f’ for face-centered,
‘i’ for body-centered, and ‘a’, ‘b’, or ‘c’ for side-centered.  Default
behavior is to perform no conversion, i.e. take (hkl) relative to the
given box.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><strong>uvws</strong> (<em>numpy.ndarray</em>) – 3x3 array of Miller [uvw] vectors or 3x4 array of Miller-Bravais [uvtw] vectors to rotate the unit cell for a free surface configuration.</p></li>
<li><p><strong>planenormal</strong> (<em>numpy.ndarray</em>) – The Cartesian plane normal vector.  Only returned if return_planenormal is True.</p></li>
</ul>
</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><ul class="simple">
<li><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.9)"><strong>ValueError</strong></a> – If invalid hkl indices values are given.</p></li>
<li><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#AssertionError" title="(in Python v3.9)"><strong>AssertionError</strong></a> – If the search fails to find any of the three [uvw] rotation vectors.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.interstitial">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">interstitial</code><span class="sig-paren">(</span><em class="sig-param">system</em>, <em class="sig-param">pos</em>, <em class="sig-param">scale=False</em>, <em class="sig-param">atol=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.interstitial" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a new system by adding an interstitial point defect.
1. Adds a new atom to the end of the Atoms list.
2. Adds per-atom property old_id if it doesn’t exist corresponding to the
atom ids in the original system.
3. Sets any of the new atom’s per-atom properties to values given as
kwargs.  Any undefined properties are given zero values except atype,
which is set to 1.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system</strong> (<a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System"><em>atomman.System</em></a>) – The base System to add the defect to.</p></li>
<li><p><strong>pos</strong> (<em>array-like object</em>) – Position of the atom being added.</p></li>
<li><p><strong>scale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if pos is Cartesian (False) or box-relative (True).  Default
value is False.</p></li>
<li><p><strong>atol</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Absolute tolerance for position-based searching. Default value is 0.01
angstroms.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em><em>, </em><em>optional</em>) – Keyword arguments corresponding to per-atom property values for the
new atom.  By default, atype==1 and all other properties are set to
be all zeros for the property’s shape.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A new system with the interstitial added.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.nye_tensor">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">nye_tensor</code><span class="sig-paren">(</span><em class="sig-param">system</em>, <em class="sig-param">p_vectors</em>, <em class="sig-param">theta_max=27</em>, <em class="sig-param">axes=None</em>, <em class="sig-param">neighbors=None</em>, <em class="sig-param">cutoff=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.nye_tensor" title="Permalink to this definition">¶</a></dt>
<dd><p>Computes strain properties and Nye tensor for a defect containing system.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system</strong> (<a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System"><em>atomman.System</em></a>) – The atomic system to compute the per-atom strain properties and Nye
tensor for.</p></li>
<li><p><strong>p_vectors</strong> (<em>array-like object</em>) – List(s) of radial distance vectors between each atom and its nearest
neighbors in a perfect crystal setting.  If one list of p_vectors is
given, then it is applied to all atoms.</p></li>
<li><p><strong>theta_max</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The maximum theta angle in degrees to use when searching for matches
between p vectors and q vectors.  Optimum values are dependent on the
crystal structure. Default value is 27, which is the original value
used for fcc crystals.</p></li>
<li><p><strong>axes</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – 3x3 array of right-handed orthogonal axes.  If given, will be used to
transform the p_vectors before computing the Nye tensor.</p></li>
<li><p><strong>neighbors</strong> (<a class="reference internal" href="atomman.NeighborList.html#atomman.NeighborList" title="atomman.NeighborList"><em>atomman.NeighborList</em></a><em>, </em><em>optional</em>) – The neighbor list associated with system to use.  Either neighbors
or cutoff must be given, or system must have a neighbors attribute.</p></li>
<li><p><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a>) – Cutoff distance for computing a neighbor list for system.  Either
neighbors or cutoff must be given, or system have a neighbors
attribute.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Contains the per-atom properties ‘strain’, ‘strain_invariant_1’,
‘strain_invariant_2’, ‘angular_velocity’, and ‘Nye_tensor’.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.9)">dict</a></p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.nye_tensor_p">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">nye_tensor_p</code><span class="sig-paren">(</span><em class="sig-param">system</em>, <em class="sig-param">neighbors=None</em>, <em class="sig-param">cutoff=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.nye_tensor_p" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a list of p vectors for each atom to be used by the nye_tensor()
function.  The p vectors correspond to the radial distance vectors between
an atom and each of its neighbors within a cutoff distance in a “perfect
crystal” reference state.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system</strong> (<em>atomman.system</em>) – The base/reference system to use.  This should be a defect-free
perfect crystal system with atom ids directly corresponding to atoms
in any system that you want to analyze with the Nye tensor.</p></li>
<li><p><strong>neighbors</strong> (<a class="reference internal" href="atomman.NeighborList.html#atomman.NeighborList" title="atomman.NeighborList"><em>atomman.NeighborList</em></a><em>, </em><em>optional</em>) – The neighbor list associated with system to use.  Either neighbors
or cutoff must be given, or system must have a neighbors attribute.</p></li>
<li><p><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a>) – Cutoff distance for computing a neighbor list for system.  Either
neighbors or cutoff must be given, or system have a neighbors
attribute.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The list of p distance vectors for each atom in system.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.ndarray</p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.pn_arctan_disregistry">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">pn_arctan_disregistry</code><span class="sig-paren">(</span><em class="sig-param">xmax=None</em>, <em class="sig-param">xstep=None</em>, <em class="sig-param">xnum=None</em>, <em class="sig-param">burgers=None</em>, <em class="sig-param">center=0.0</em>, <em class="sig-param">halfwidth=1</em>, <em class="sig-param">normalize=True</em>, <em class="sig-param">shift=True</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.pn_arctan_disregistry" title="Permalink to this definition">¶</a></dt>
<dd><p>Computes the classic Peierls-Nabarro arctan disregistry for an array of
points x.</p>
<blockquote>
<div><p>δ(x) = b / π * arctan(x / ξ) + b / 2</p>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>xmax</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.9)"><em>None</em></a><em>, </em><em>optional</em>) – Maximum value of x to use.  Minimum value is taken as -xmax.  At least
2 of xmax, xstep, and xnum must be not None.  Default value is None.</p></li>
<li><p><strong>xstep</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.9)"><em>None</em></a><em>, </em><em>optional</em>) – Step size to use between each x value.  At least 2 of xmax, xstep, and
xnum must be not None.  Default value is None.</p></li>
<li><p><strong>xnum</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.9)"><em>None</em></a><em>, </em><em>optional</em>) – Number of x values to use.  At least 2 of xmax, xstep, and xnum must
be not None.  Default value is None.</p></li>
<li><p><strong>burgers</strong> (<em>numpy.ndarray</em><em>, </em><em>optional</em>) – The Burgers vector for the dislocation. Default value is [1, 0, 0].</p></li>
<li><p><strong>center</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a>) – The x coordinate to center the dislocation at. Default value is 0.0.</p></li>
<li><p><strong>halfwidth</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – The dislocation halfwidth to use. Default value is 1.</p></li>
<li><p><strong>normalize</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – If True (default), the disregistry values will be scaled such that the
two endpoints differ by exactly one Burgers vector.</p></li>
<li><p><strong>shift</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – If True (default), the disregistry will range [0, 0, 0] to burgers.
If False, the disregistry will range from -burgers to burgers.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p><strong>x</strong> (<em>numpy.ndarray</em>) – The x-coordinates for the disregistry values.</p></li>
<li><p><strong>disregistry</strong> (<em>numpy.ndarray</em>) – The disregistry vector at each x-coordinate.</p></li>
</ul>
</p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.point">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">point</code><span class="sig-paren">(</span><em class="sig-param">system</em>, <em class="sig-param">ptd_type='v'</em>, <em class="sig-param">pos=None</em>, <em class="sig-param">ptd_id=None</em>, <em class="sig-param">db_vect=None</em>, <em class="sig-param">scale=False</em>, <em class="sig-param">atol=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.point" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a new System where a point defect has been inserted.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system</strong> (<a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System"><em>atomman.System</em></a>) – The base System to add the defect to.</p></li>
<li><p><strong>ptd_type</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em>, </em><em>optional</em>) – Key indicating which type of defect to add. Default value is ‘v’:
- ‘v’ : vacancy.
- ‘i’ : positional interstitial.
- ‘s’ : substitutional.
- ‘db’ : dumbbell interstitial.</p></li>
<li><p><strong>pos</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – Position for adding the defect atom (all styles).</p></li>
<li><p><strong>ptd_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a><em>, </em><em>optional</em>) – Atom id where defect is added.  Alternative to using pos
(‘v’, ‘s’, ‘db’ styles).</p></li>
<li><p><strong>db_vect</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – Vector associated with the dumbbell interstitial (‘db’ style).</p></li>
<li><p><strong>scale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if pos and db_vect are Cartesian (False) or box-relative
(True). Default value is False.</p></li>
<li><p><strong>atol</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Absolute tolerance for position-based searching. Default value is 0.01
angstroms.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em><em>, </em><em>optional</em>) – Keyword arguments corresponding to per-atom property values for the
new atom (‘i’, ‘s’, ‘db’ styles).</p></li>
</ul>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><ul class="simple">
<li><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#AssertionError" title="(in Python v3.9)"><strong>AssertionError</strong></a> – If parameters are given for styles that don’t allow them.</p></li>
<li><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.9)"><strong>ValueError</strong></a> – If an invalid ptd_type is given.</p></li>
</ul>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>A new system containing the defect.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.slip_vector">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">slip_vector</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.slip_vector" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the slip vectors for all atoms.  Note that this differs from the
original formulation in that it is not normalized by number of slipped
neighbors.</p>
<blockquote>
<div><p>s_i = -Σ_j d_ij(t) - d_ij(0)</p>
</div></blockquote>
<p>where j is neighbor atoms of atom i, and d_ij() is vector distance between
atoms i and j at time t.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system_0</strong> (<em>atomman.system</em>) – The base/reference system to use.</p></li>
<li><p><strong>system_1</strong> (<em>atomman.system</em>) – The defect/current system to use.</p></li>
<li><p><strong>neighbors</strong> (<a class="reference internal" href="atomman.NeighborList.html#atomman.NeighborList" title="atomman.NeighborList"><em>atomman.NeighborList</em></a><em>, </em><em>optional</em>) – The neighbor list associated with system_0 to use.  Either neighbors
or cutoff must be given, or system_0 must have a neighbors attribute.</p></li>
<li><p><strong>cutoff</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Cutoff distance for computing a neighbor list for system_0.  Either
neighbors or cutoff must be given, or system_0 have a neighbors
attribute.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The computed slip vectors.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.ndarray</p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.solve_volterra_dislocation">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">solve_volterra_dislocation</code><span class="sig-paren">(</span><em class="sig-param">C, burgers, ξ_uvw=None, slip_hkl=None, transform=None, axes=None, box=None, m=[1, 0, 0], n=[0, 1, 0], tol=1e-08</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.solve_volterra_dislocation" title="Permalink to this definition">¶</a></dt>
<dd><p>Wrapper function for generating VolterraDislocation children classes
that provide linear elastic solutions for straight dislocations.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>C</strong> (<a class="reference internal" href="atomman.ElasticConstants.html#atomman.ElasticConstants" title="atomman.ElasticConstants"><em>atomman.ElasticConstants</em></a>) – The medium’s elastic constants.</p></li>
<li><p><strong>burgers</strong> (<em>array-like object</em>) – The dislocation’s Burgers vector.</p></li>
<li><p><strong>ξ_uvw</strong> (<em>array-like object</em>) – The Miller crystal vector associated with the dislocation’s line
direction.  Must be given with slip_hkl to identify the
transformation matrix to use on C and burgers.</p></li>
<li><p><strong>slip_hkl</strong> (<em>array-like object</em>) – The Miller plane indices associated with the dislocation’s slip
plane.  Must be given with ξ_uvw to identify the
transformation matrix to use on C and burgers.</p></li>
<li><p><strong>transform</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – A 3x3 set of orthogonal Cartesian vectors that define the
transformation matrix to use on C and burgers to convert from the
standard (unit cell) and dislocation orientations.  The 3 vectors
will automatically be converted into unit vectors.  Using this is
an alternative to using ξ_uvw and slip_hkl.</p></li>
<li><p><strong>axes</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – Same as transform.  Retained for backwards compatibility.</p></li>
<li><p><strong>box</strong> (<a class="reference internal" href="atomman.Box.html#atomman.Box" title="atomman.Box"><em>atomman.Box</em></a><em>, </em><em>optional</em>) – The unit cell’s box that crystal vectors are taken with respect to.
If not given, will use a cubic box with a=1 meaning that burgers,
ξ_uvw and slip_hkl will be interpreted as Cartesian vectors.</p></li>
<li><p><strong>m</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The m unit vector for the solution.  m, n, and u (dislocation
line) should be right-hand orthogonal.  Default value is [1,0,0]
(x-axis).</p></li>
<li><p><strong>n</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – The n unit vector for the solution.  m, n, and u (dislocation
line) should be right-hand orthogonal.  Default value is [0,1,0]
(y-axis). n is normal to the dislocation slip plane.</p></li>
<li><p><strong>tol</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a>) – Tolerance parameter used to round off near-zero values.  Default
value is 1e-8.</p></li>
<li><p><strong>Returns</strong> – </p></li>
<li><p><strong>atomman.defect.VolterraDislocation</strong> – The dislocation solution of the appropriate type.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.substitutional">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">substitutional</code><span class="sig-paren">(</span><em class="sig-param">system</em>, <em class="sig-param">pos=None</em>, <em class="sig-param">ptd_id=None</em>, <em class="sig-param">atype=1</em>, <em class="sig-param">scale=False</em>, <em class="sig-param">atol=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.substitutional" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a new system by adding a substitutional point defect.
1. Moves the indicated atom to the end of the list and changes its atype
to the value given.
2. Adds per-atom property old_id if it doesn’t exist corresponding to the
atom ids in the original system.
3. Sets any of the moved atom’s per-atom properties to values given as
kwargs.  Any undefined properties are left unchanged.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system</strong> (<a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System"><em>atomman.System</em></a>) – The base System to add the defect to.</p></li>
<li><p><strong>pos</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – Position of the atom being modified.  Either pos or ptd_id must be
given.</p></li>
<li><p><strong>ptd_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a><em>, </em><em>optional</em>) – Id of the atom to be modified.  Either pos or ptd_id must be given.</p></li>
<li><p><strong>atype</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a><em>, </em><em>optional</em>) – Integer atomic type to change the identified atom to.  Must be
different than the atom’s current id.  Default value is 1.</p></li>
<li><p><strong>scale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if pos is Cartesian (False) or box-relative (True).  Default
value is False.</p></li>
<li><p><strong>atol</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Absolute tolerance for position-based searching. Default value is 0.01
angstroms.</p></li>
<li><p><strong>**kwargs</strong> (<em>any</em><em>, </em><em>optional</em>) – Keyword arguments corresponding to per-atom property values for the
modified atom.  By default, all properties (except atype) are left
unchanged.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A new system with the substitutional added.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="atomman.defect.vacancy">
<code class="sig-prename descclassname">atomman.defect.</code><code class="sig-name descname">vacancy</code><span class="sig-paren">(</span><em class="sig-param">system</em>, <em class="sig-param">pos=None</em>, <em class="sig-param">ptd_id=None</em>, <em class="sig-param">scale=False</em>, <em class="sig-param">atol=None</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.defect.vacancy" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a new system by adding a vacancy point defect.
1. Removes the indicated atom from the system
2. Adds per-atom property old_id if it doesn’t exist corresponding to the
atom ids in the original system.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>system</strong> (<a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System"><em>atomman.System</em></a>) – The base System to add the defect to.</p></li>
<li><p><strong>pos</strong> (<em>array-like object</em><em>, </em><em>optional</em>) – Position of the atom to be removed.  Either pos or ptd_id must be
given.</p></li>
<li><p><strong>ptd_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a><em>, </em><em>optional</em>) – Id of the atom to be removed.  Either pos or ptd_id must be given.</p></li>
<li><p><strong>scale</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if pos is Cartesian (False) or box-relative (True). Default
value is False.</p></li>
<li><p><strong>atol</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a><em>, </em><em>optional</em>) – Absolute tolerance for position-based searching. Default value is 0.01
angstroms.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A new system with the vacancy added.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="atomman.System.html#atomman.System" title="atomman.System">atomman.System</a></p>
</dd>
</dl>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">defect</a><ul>
<li><a class="reference internal" href="#classes">Classes</a></li>
<li><a class="reference internal" href="#module-atomman.defect">Functions and attributes</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="atomman.library.RelaxedCrystal.html"
                        title="previous chapter">RelaxedCrystal</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="atomman.defect.FreeSurface.html"
                        title="next chapter">FreeSurface</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.defect.FreeSurface.html" title="FreeSurface"
             >next</a> |</li>
        <li class="right" >
          <a href="atomman.library.RelaxedCrystal.html" title="RelaxedCrystal"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" >atomman package</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0.
    </div>
  </body>
</html>